<template>
  <div class="banner-wrapper">
    <van-swipe class="my-swipe" :autoplay="2500" indicator-color="white">
      <van-swipe-item v-for="item in bannerData" :key="item.id">
        <img :src="item.img" @click="jump(item.url)" alt="淘宝客活动">
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
import { getAllBanner } from '@/api/Banner';
export default {
  name: "banner",
  data() {
    return {
      bannerData: []
    }
  },
  mounted() {
    getAllBanner().then(res => this.bannerData = res)
  }

}
</script>

<style scoped>
.banner-wrapper img{
  width: 94%;
  height: 130px;
  margin-top:10px;
  margin-left: 3%;
  border-radius: 5px;
  border-top-right-radius: 15px;
}
</style>